#include "testucadapter.h"

void TestUCAdapter::testUCAdapter()
{
    ProjectBayAdapter * adapter = new ProjectBayAdapter();
    QVERIFY(adapter->connectToDatabase() == true);

    UseCaseModel * model = adapter->createModel();
    if(!model)
        QFAIL("Model is null.");

    foreach(UseCase * uc, model->useCaseList())
    {
        qDebug(qPrintable(QString::number(uc->id()) + " " + uc->name() + " " + uc->description()));
    }
}

QTEST_MAIN(TestUCAdapter)
